package cn.edu.just.firstjavaapp.l10.v2;

abstract public class Shape {
    int x;
    int y;

    public Shape() {
        this(0,0);
    }

    public Shape(int x, int y) {  //全参构造函数
        this.x = x;
        this.y = y;
    }

    public void move(int newX, int newY){
        this.x = newX;
        this.y = newY;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    abstract public void draw();

}
